﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestAccordionGridview.aspx.cs"
    Inherits="WebApplication2.TestAccordionGridview" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="testAccordionGridview" runat="server">
    <title>Untitled Page</title>
    <style type="text/css">
        .acc-header, .acc-selected
        {
            width: 300px;
            background-color: #c0c0c0;
            margin-bottom: 2px;
            padding: 2px;
            color: #444444;
            font-weight: bold;
            cursor: pointer;
        }
        .acc-content
        {
            width: 300px;
            margin-bottom: 2px;
            padding: 2px;
        }
        .acc-selected, .acc-content
        {
            border: solid 1px #666666;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
        <asp:Accordion ID="Accordion1" runat="server" TransitionDuration="100" FramesPerSecond="200"
            FadeTransitions="true" RequireOpenedPane="false" OnItemDataBound="Accordion1_ItemDataBound"
            ContentCssClass="acc-content" HeaderCssClass="acc-header" HeaderSelectedCssClass="acc-selected">
            <HeaderTemplate>
                <%#DataBinder.Eval(Container.DataItem,"name") %>
            </HeaderTemplate>
            <ContentTemplate>
                <asp:HiddenField ID="txt_categoryID" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"ID") %>' />
                <asp:GridView ID="GridView1" runat="server" RowStyle-BackColor="#ededed" RowStyle-HorizontalAlign="Left"
                    AutoGenerateColumns="false" GridLines="None" CellPadding="2" CellSpacing="2"
                    Width="300px">
                    <Columns>
                        <asp:TemplateField HeaderStyle-HorizontalAlign="Left" HeaderText="Product Name" HeaderStyle-BackColor="#d1d1d1"
                            HeaderStyle-ForeColor="#777777">
                            <ItemTemplate>
                                <%#DataBinder.Eval(Container.DataItem,"title") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </ContentTemplate>
        </asp:Accordion>
    </div>
    </form>
</body>
</html>
